From: Jochen Sprickerhof Date: Sun, 16 Jun 2019 12:23:42 +0000 (+0200) Subject: Port to dh 12 X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~110 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=201eb450a183819063655ff117c24b33d670d836;p=gpsbabel.git Port to dh 12 Closes: #912089 --- diff --git a/debian/clean b/debian/clean new file mode 100644 index 000000000..cdd0b9948 --- /dev/null +++ b/debian/clean @@ -0,0 +1,4 @@ +debian/doctmp/ +debian/doctmpcapabilities.inc +debian/gpsbabel.1 +debian/gpsbabel.xpm diff --git a/debian/compat b/debian/compat deleted file mode 100644 index f599e28b8..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/debian/control b/debian/control index e5995e81b..300fe19c5 100644 --- a/debian/control +++ b/debian/control @@ -2,19 +2,21 @@ Source: gpsbabel Section: utils Priority: optional Maintainer: Bernd Zeimetz -Build-Depends: debhelper (>= 10~), quilt, - autotools-dev, autoconf, +Build-Depends: debhelper-compat (= 12), + pkg-config, libexpat1-dev, expat, help2man, libxml2-utils, libusb-dev, zlib1g-dev, - qtbase5-dev, + libshp-dev, + qt5-default, qtwebengine5-dev [amd64 arm64 armhf i386 mipsel], qttools5-dev-tools, imagemagick, locales-all Build-Depends-Indep: fop [!mips], xsltproc, docbook-xml, docbook-xsl, libpaper-dev -Standards-Version: 3.8.4 +Standards-Version: 4.3.0 +Rules-Requires-Root: no Homepage: http://www.gpsbabel.org/ Vcs-Git: https://github.com/bzed/pkg-gpsbabel.git Vcs-Browser: https://github.com/bzed/pkg-gpsbabel @@ -51,10 +53,11 @@ Description: GPS file conversion plus transfer to/from GPS units Package: gpsbabel-doc Architecture: all +Multi-Arch: foreign Section: doc Depends: ${misc:Depends} Suggests: gpsbabel, pdf-viewer | www-browser -Description: GPS file conversion plus transfer to/from GPS units +Description: GPS file conversion plus transfer to/from GPS units - documentation GPSBabel converts waypoints, tracks, and routes from one format to another, whether that format is a common mapping format like Delorme, Streets and Trips, or even a serial upload or download to a GPS unit diff --git a/debian/gpsbabel-doc.doc-base b/debian/gpsbabel-doc.doc-base new file mode 100644 index 000000000..ea8d6b96a --- /dev/null +++ b/debian/gpsbabel-doc.doc-base @@ -0,0 +1,10 @@ +Document: gpsbabel +Title: gpsbabel filter and format documentation +Section: Science/Geoscience + +Format: HTML +Files: /usr/share/doc/gpsbabel/gpsbabel.html +Index: /usr/share/doc/gpsbabel/gpsbabel.html + +Format: PDF +Files: /usr/share/doc/gpsbabel/gpsbabel.pdf.gz diff --git a/debian/gpsbabel-doc.doc-base-common b/debian/gpsbabel-doc.doc-base-common deleted file mode 100644 index 68cc45d9d..000000000 --- a/debian/gpsbabel-doc.doc-base-common +++ /dev/null @@ -1,8 +0,0 @@ -Document: gpsbabel -Title: gpsbabel filter and format documentation -Section: Science/Geoscience - -Format: HTML -Files: /usr/share/doc/gpsbabel/gpsbabel.html -Index: /usr/share/doc/gpsbabel/gpsbabel.html - diff --git a/debian/gpsbabel-doc.doc-base-pdf b/debian/gpsbabel-doc.doc-base-pdf deleted file mode 100644 index 25c5b5b9e..000000000 --- a/debian/gpsbabel-doc.doc-base-pdf +++ /dev/null @@ -1,3 +0,0 @@ -Format: PDF -Files: /usr/share/doc/gpsbabel/gpsbabel.pdf - diff --git a/debian/gpsbabel-doc.docs b/debian/gpsbabel-doc.docs new file mode 100644 index 000000000..9f7267be7 --- /dev/null +++ b/debian/gpsbabel-doc.docs @@ -0,0 +1,2 @@ +gpsbabel.html +gpsbabel.pdf diff --git a/debian/gpsbabel-doc.install b/debian/gpsbabel-doc.install deleted file mode 100644 index 71d2e655d..000000000 --- a/debian/gpsbabel-doc.install +++ /dev/null @@ -1 +0,0 @@ -debian/doctmp/* usr/share/doc/gpsbabel diff --git a/debian/gpsbabel-gui.desktop b/debian/gpsbabel-gui.desktop deleted file mode 100644 index 31fbb851e..000000000 --- a/debian/gpsbabel-gui.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=GPSBabel -Comment= -Exec=gpsbabelfe -Terminal=false -StartupNotify=no -Icon=gpsbabel.xpm -Categories=Education;Science;Geoscience diff --git a/debian/gpsbabel-gui.install b/debian/gpsbabel-gui.install index 4ac5cebc8..640bf7c89 100644 --- a/debian/gpsbabel-gui.install +++ b/debian/gpsbabel-gui.install @@ -1,3 +1,3 @@ -gui/objects/gpsbabelfe /usr/bin +gui/gpsbabelfe /usr/bin debian/gpsbabel.xpm /usr/share/pixmaps -debian/gpsbabel-gui.desktop /usr/share/applications +gui/gpsbabel.desktop /usr/share/applications diff --git a/debian/gpsbabel-gui.menu b/debian/gpsbabel-gui.menu deleted file mode 100644 index 6cae1da94..000000000 --- a/debian/gpsbabel-gui.menu +++ /dev/null @@ -1,5 +0,0 @@ -?package(gpsbabel-gui): needs="X11"\ - section="Applications/Science/Geoscience"\ - title="GPSBabel"\ - icon="/usr/share/pixmaps/gpsbabel.xpm"\ - command="/usr/bin/gpsbabelfe" diff --git a/debian/gpsbabel.install b/debian/gpsbabel.install new file mode 100644 index 000000000..9e0436b2e --- /dev/null +++ b/debian/gpsbabel.install @@ -0,0 +1 @@ +usr/bin/gpsbabel diff --git a/debian/patches/0011-Fix-exec-in-gpsbabel.desktop.patch b/debian/patches/0011-Fix-exec-in-gpsbabel.desktop.patch new file mode 100644 index 000000000..724056bb9 --- /dev/null +++ b/debian/patches/0011-Fix-exec-in-gpsbabel.desktop.patch @@ -0,0 +1,20 @@ +From: Jochen Sprickerhof +Date: Sun, 16 Jun 2019 16:09:18 +0200 +Subject: Fix exec in gpsbabel.desktop + +--- + gui/gpsbabel.desktop | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gui/gpsbabel.desktop b/gui/gpsbabel.desktop +index 4ae4525..fe956c2 100644 +--- a/gui/gpsbabel.desktop ++++ b/gui/gpsbabel.desktop +@@ -4,6 +4,6 @@ Name=GPSBabel + Comment=Qt GUI interface for GPSBabel + GenericName=GPSBabel + Icon=gpsbabel +-Exec=gpsbabelfe-bin ++Exec=gpsbabelfe + Terminal=false + Categories=Geography;Education;Utility; diff --git a/debian/patches/series b/debian/patches/series index 35b512761..d8b0e0304 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ htmldoc-location 0006-Use-system-zlib.patch 0007-Use-system-shapelib.patch 0008-Use-usb.h-from-system-include-dir.patch +0011-Fix-exec-in-gpsbabel.desktop.patch diff --git a/debian/rules b/debian/rules index 5a3d77f16..45bacbf48 100755 --- a/debian/rules +++ b/debian/rules @@ -1,52 +1,27 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +%: + dh $@ -export QT_SELECT=qt5 - - -PKG_GPSBABEL=gpsbabel -PKG_GPSBABEL_GUI=gpsbabel-gui +export DEB_BUILD_MAINT_OPTIONS = hardening=+all DOCTEMP = $(CURDIR)/debian/doctmp -VERSION := $(shell dpkg-parsechangelog | awk '/^Version/ {print $$2}') -HOSTARCH := $(strip $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)) - -#we use quilt to handle our patches -include /usr/share/quilt/quilt.make - - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif +include /usr/share/dpkg/pkg-info.mk # Extended precision on i386 results in weird bugs, so we build # with -ffloat-store. -ifeq (i386,$(HOSTARCH)) +ifneq (,$(filter $(DEB_BUILD_ARCH),i386)) CFLAGS += -ffloat-store endif -LDFLAGS += -Wl,-z,defs -CONFENV = LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" - - -configure: configure-stamp gui/Makefile -configure-stamp: $(QUILT_STAMPFN) - dh_testdir - dh_autotools-dev_updateconfig - mkdir -p xmldoc/autogen - $(CONFENV) ./configure \ +override_dh_auto_configure: + dh_auto_configure -- \ --with-zlib=system \ --with-doc=$(DOCTEMP) \ --prefix=/usr + convert -resize 32x32 gui/images/appicon.png debian/gpsbabel.xpm - touch $@ -debian/gpsbabel.1: build-stamp +override_dh_installman: export PATH="$(CURDIR)/gpsbabel:$$PATH" ;\ help2man --manual='gpsbabel documentation' \ --section=1 \ @@ -54,138 +29,13 @@ debian/gpsbabel.1: build-stamp --source='http://www.gpsbabel.org' \ --locale=C \ -N \ - --version-string=$(VERSION) \ + --version-string=$(DEB_VERSION) \ --opt-include=$(CURDIR)/debian/gpsbabel.help2man \ - -o $@ \ + -o debian/gpsbabel.1 \ ./gpsbabel + dh_installman -gui/Makefile: $(QUILT_STAMPFN) - set -e; cd gui; if dpkg -s qtwebengine5-dev; then \ - qmake; \ - else \ - echo -e '#!/usr/bin/make -f\n\n%:\n\techo $$@' > Makefile ; \ - fi - -debian/gpsbabel.xpm: gui/images/appicon.png - convert -resize 32x32 $< $@ - -BUILD_TARGETS_ARCH = build-stamp build-gui-stamp debian/gpsbabel.1 -BUILD_TARGETS_INDEP = build-doc-stamp -# indep targets are only built by binary-indep. -build: $(BUILD_TARGETS_ARCH) - -build-stamp: configure-stamp debian/gpsbabel.xpm - dh_testdir - - # Add here commands to compile the package. - $(MAKE) -ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - chmod u+x testo - $(MAKE) check || true -endif - - touch $@ - -# We need a gpsbabel binary to build the documentation. -build-doc-stamp: build-stamp - mkdir -p debian/doctmp/htmldoc-devel - perl xmldoc/makedoc && cd .. +override_dh_installdocs: + $(MAKE) doc $(MAKE) gpsbabel.html - cp gpsbabel.html debian/doctmp - cp $(CURDIR)/debian/gpsbabel-doc.doc-base-common $(CURDIR)/debian/gpsbabel-doc.doc-base -ifneq (mips,$(HOSTARCH)) - $(MAKE) gpsbabel.pdf WEB=$(DOCTEMP) DOCVERSION=devel - cp gpsbabel.pdf $(DOCTEMP) - cat $(CURDIR)/debian/gpsbabel-doc.doc-base-pdf >> $(CURDIR)/debian/gpsbabel-doc.doc-base -endif - rm -rf debian/doctmp/htmldoc-devel - touch $@ - -build-gui: build-gui-stamp -build-gui-stamp: gui/Makefile - if dpkg -s qtwebengine5-dev; then $(MAKE) gui; fi - touch $@ - -clean: clean-patched unpatch -clean-patched: - dh_testdir - dh_testroot - rm -f *-stamp dep doc/*.ps - rm -rf xmldoc/autogen - rm -f debian/gpsbabel.xpm - - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) clean - [ ! -f gui/Makefile ] || $(MAKE) gui clean - rm -rf debian/doctmp xmldoc/autogen/* - rm -rf Makefile config.h config.log config.status \ - gpsbabel.fo tools/mkcapabilities win32/gpsbabel.rc \ - xmldoc/makedoc \ - zlib/empty jeeps/Makefile shapelib/Makefile - rm -f debian/*.inc - rm -rf gui/Makefile gui/objects gui/setup.iss - rm -f debian/gpsbabel.1 - rm -f gpsbabel.pdf - rm -f gui/makelinuxdist.sh - rm -f xmldoc/formats/tomtom_itn_places.xml \ - xmldoc/formats/options/naviguide-reorder.xml \ - xmldoc/formats/options/naviguide-output.xml \ - xmldoc/filters/options/track-trk2seg.xml \ - xmldoc/filters/options/track-seg2trk.xml - rm -f gbversion.h - rm -f $(CURDIR)/debian/gpsbabel-doc.doc-base - dh_autotools-dev_restoreconfig - dh_clean - -install-prep: - dh_testdir - dh_testroot - dh_prep - dh_installdirs - -install-arch: $(BUILD_TARGETS_ARCH) install-prep - - # Add here commands to install the package into debian/gpsbabel. - $(MAKE) install DESTDIR=$(CURDIR)/debian/gpsbabel - - dh_install -a - -install-indep: $(BUILD_TARGETS_INDEP) install-prep - dh_install -i - - -install: install-arch install-indep - -# Build architecture-independent files here. -binary-indep: build-indep install-indep - dh_testdir - dh_testroot - dh_installchangelogs -i - dh_installdocs -i - dh_link -i - dh_compress -i -X.pdf -X.html - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build-arch install-arch - dh_testdir - dh_testroot - dh_installchangelogs -a - dh_installdocs -a - dh_installman -a - dh_installmenu -a - dh_strip -a - dh_compress -a -X.pdf -X.html - dh_fixperms -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install install-prep install-arch install-indep build-arch build-indep configure + dh_installdocs